package ezcaptcha

import "net/url"

type Region url.URL

var (
	RegionGlobal = &Region{Scheme: "https", Host: "api.ez-captcha.com"}
	RegionCN     = &Region{Scheme: "http", Host: "47.115.166.118:15000"}
)

func (r *Region) NewURL(path string) *url.URL {
	return (*url.URL)(r).JoinPath(path)
}

func (r *Region) NewURLString(path string) string {
	return r.NewURL(path).String()
}
